
[dbo].[asi_GroupRoleInstanceCountByType]
CREATE PROCEDURE [dbo].[asi_GroupRoleInstanceCountByType]
@groupTypeKey uniqueidentifier,
@groupRoleKey uniqueidentifier
AS
BEGIN
SELECT COUNT(1) AS RoleCount
FROM GroupMain INNER JOIN GroupInstanceRole on GroupMain.GroupKey = GroupInstanceRole.GroupKey
WHERE GroupMain.GroupTypeKey = @groupTypeKey AND GroupInstanceRole.GroupRoleKey=@groupRoleKey
END
GO